<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>产品修改</title>
	
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resources/css/common/summernote.css">	
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resources/css/back/editproduct.css">
</head>
<body>
	<h1>产品列表--产品修改</h1><br>

<div id="edit">
		<form id="uploadform"  method="post" enctype="multipart/form-data">
		<input style="display: none;" type="text" name="id" value="${pro.id }">
		<strong>产品名称：</strong><input type="text" name="proName" value="${pro.proName }">  &nbsp;&nbsp;<label class="label label-warning">10字以内</label><br>
		<strong>产品描述：</strong><input type="text" name="proDescription" value="${pro.proDescription }">  &nbsp;&nbsp;<label class="label label-warning">30字以内</label><br>
		<strong>产品类型：</strong><input type="text" name="type" value="${pro.type }"><br>		
		<strong>产品价格：</strong><input type="text" name="proPrice" value="${pro.proPrice }">
		<span class="label label-primary">元</span>	<br>		
		<strong>满&nbsp;意&nbsp;度&nbsp;：&nbsp;</strong><input type="text" name="satisfaction" value="${pro.satisfaction }">
		<span class="label label-primary">&nbsp;%&nbsp;</span><br>			
		<strong>产品库存：</strong><input type="text" name="stock" value="${pro.stock }">
		<span class="label label-primary">件</span>	<br>	
		<strong>产品图片：</strong>
		<input style="display: none;" type="text" name="subImages">
		<input style="display: none;" type="text" name="detail">
		<input style="display: none;" type="text" name="food">
		<input style="display: none;" type="text" name="route">
		
		<div class = "pro_pic">      
			<c:forTokens items="${pro.subImages }" delims="," var="subimage">
				<a href="JavaScript:void()" onclick="deletepic(this)"><img src = ${subimage } class="img-thumbnail pic" ></a>
			</c:forTokens>
		</div>
		
		 <input type="file" name="file" onchange="upload()"><br>
		</form> 
	<br>
	<strong>产品详情：</strong><br>

	<div id="pro_detail">
		<form id="richtextform"  method="post" enctype="multipart/form-data">
			<div id="summernote">${pro.detail }</div>
		</form> 
		
	</div>
	<strong>美食推荐：</strong><br><br>
	<div id="food">
		<form id="richtextform_food"  method="post" enctype="multipart/form-data">
			<div id="summernote_food">${pro.food }</div>
		</form> 
		
	</div>
	
	<strong>行程路线：</strong><br><br>
	<div id="route">
		<form id="richtextform_route"  method="post" enctype="multipart/form-data">
			<div id="summernote_route">${pro.route }</div>
		</form> 
		
	</div>
</div>
		<a class="btn btn-info btn-lg" onclick="save()">保存修改</a>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/common/jquery.form.js"></script>	
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/common/summernote.min.js"></script>	
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/common/summernote-zh-CN.js"></script>	
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/back/editproduct.js"></script>	

</body>
</html>